#region Using

using System;

#endregion

namespace SemanticEngine.Apml
{
	public class Author : ItemBase
	{

		#region Constructors

		public Author()
		{ }

		public Author(string name)
		{
			Name = name;
		}

		public Author(string name, double rank)
		{
			Name = name;
			base.Rank = rank;
		}

		public Author(string name, double rank, string from)
		{
			Name = name;
			base.Rank = rank;
			base.From = from;
		}

		#endregion

		#region Properties

		private string _Name;

		public string Name
		{
			get { return _Name; }
			set { _Name = value; }
		}

		#endregion

		protected override void Validate()
		{
			base.Validate();
			AddRule("Name", "You must specify a name of an author", string.IsNullOrEmpty(Name));
		}
	}
}
